package com.zhuzl.orderservice.api.stock;

import com.zhuzl.orderservice.api.consts.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author JZY001
 *
 */
@FeignClient(value = ServiceNameConstants.SERVER_STOCK)
public interface StockApi {

    /**
     * 扣减库存
     * @param id 商品id
     * @param count 数量
     * @return String
     */
    @PostMapping("/stock/decrease")
    String decrease(@RequestParam("id") Integer id, @RequestParam("count") Integer count);

}
